<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%@taglib prefix="s" uri="/struts-tags"%>

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
	<head>
		<title>Alterar Tipo SGDB</title>
		<s:url value="/css/style.css" var="cssStyle"></s:url>
		<link rel="stylesheet" type="text/css" href="${cssStyle}" media="screen">
		<script type="text/javascript">
		$(document).ready(function(){
			$(".confirm").click(function(){
   				var sgdb = $("#idSgdb").val();
 				if(!sgdb==""){
 					if(!confirm("Confirma Alteração do SGDB: "+sgdb+"?")){
      					$("#loading").hide();
						$(".loadingImage").CenterIt();
						$(".loadingImage").hide();	
      					return false;
   					}
   				}
			});

			$("#idForm").submit(function(){
				var sgdb  = $("#idSgdb").val();
				if(sgdb==""){
					$("p").hide();
					$("#idSgdb").after("<p style='color:red;'>Tipo de SGDB é obrigatório.</p>");
					$("#loading").hide();
					$(".loadingImage").CenterIt();
					$(".loadingImage").hide();	
					return false;
				}else{
					$("p").hide();
				}
			});
		});
		</script>
	</head>
	<body>	
		<s:form action="alterar-tiposgdb" namespace="/" method="POST" id="idForm">
			<s:hidden name="altTipoSgdb.id"></s:hidden>
			<s:textfield label="Tipo SGDB" name="altTipoSgdb.nmsgdb" id="idSgdb"/>
			<input value="Alterar" type="submit" class="confirm"/>
			<input type="button" onclick="window.history.go(-1)" value="Cancelar"/>
		</s:form>
	</body>
</html>
